#include<bits/stdc++.h>

using namespace std;
int a[1000];
int b[] = {1, 2, 3, 4, 5};
int n = 4;

void dfs(int k) {
    if (k > n) {
        int sum = 0;
        for (int i = 0; i <= n; i++) {
            if (a[i] == 1) {
                sum += b[i];
            }
        }
        if (sum == 10) {
            copy(a, a + n + 1, ostream_iterator<int>(cout, ""));
            cout << endl;
        }

        return;
    }
    a[k] = 0;
    dfs(k + 1);
    a[k] = 1;
    dfs(k + 1);
}

int main() {
    dfs(0);
    return 0;
}
